package org.com.andy.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * <p>工作流任务<p>
 *
 * @author Tony
 * @date 2021-04-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("工作流任务相关-返回参数")
public class FlowBizKeyDto implements Serializable {

    @ApiModelProperty("业务唯一ID")
    private String businessKey;

    @ApiModelProperty("实例ID")
    private String instanceId;

    @ApiModelProperty("任务编号")
    private String taskId;

    @ApiModelProperty("全局变量")
    private Map<String,Object> variables;

    @ApiModelProperty("瞬态变量(支撑业务下一步的必要条件变量)")
    private Map<String,Object> transientVariables;

    @ApiModelProperty("任务执行编号")
    private String executionId;

    @ApiModelProperty("任务名称")
    private String taskName;

    @ApiModelProperty("任务Key")
    private String taskDefKey;

    @ApiModelProperty("任务执行人Id")
    private String assigneeId;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("流程发起人部门名称")
    private String startDeptName;

    @ApiModelProperty("任务执行人名称")
    private String assigneeName;

    @ApiModelProperty("任务执行人部门")
    private String assigneeDeptName;

    @ApiModelProperty("流程发起人Id")
    private String startUserId;

    @ApiModelProperty("流程发起人名称")
    private String startUserName;

    @ApiModelProperty("流程类型")
    private String category;

    @ApiModelProperty("流程变量信息")
    private Object procVars;

    @ApiModelProperty("局部变量信息")
    private Object taskLocalVars;

    @ApiModelProperty("流程部署编号")
    private String deployId;

    @ApiModelProperty("流程定义ID")
    private String processDefinitionId;

    @ApiModelProperty("任务耗时")
    private String duration;

    @ApiModelProperty("任务意见")
    private String comment;

    @ApiModelProperty("候选执行人")
    private String candidate;

    @ApiModelProperty("任务创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("任务完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
    private Date finishTime;

    @ApiModelProperty("预计完成时间")
    private Date planEndTime;

    @ApiModelProperty("重要程度/优先级")
    private int priority;

    @ApiModelProperty("超期标识")
    private String dueFlag;

}
